using Pvp.Timeline;

namespace Pvp
{
    partial class PvpEntry
    {
        public class SkillX
        {
            private PvpEntry _entry;

            public SkillX(PvpEntry entry)
            {
                _entry = entry;
            }
            public void ProcessSkill()
            {
                foreach (var kvp in _entry.unitEntityMap)
                {
                    HandleEntity(kvp.Value);
                }
            }

            private void HandleEntity(FightUnitEntity unit)
            {
                if (unit.skillIndex != 0 && unit.canSkillFalg)
                    return;
                unit.skillDirector.ClearAssets();
                var item = unit.skillData.GetSkill(unit.skillIndex);
                foreach (var asset in item.skillAssets)
                {
                    unit.skillDirector.AddAssetFormTrail(asset);
                }
                unit.skillDirector.PlayAt();
            }
        }
        
        public class StageX
        {
            public StageX()
            {
                
            }

            public void ProcessStage()
            {
                
            }
        }
    }
}